const directives = import.meta.globEager("./modules/**/*.ts");

//循环遍历directives，通过vue.directive注册
export default {
  install(app) {
    Object.keys(directives).forEach((key) => {
      console.log(key, directives[key]);
      const realKey = key.match(/\/modules\/(\S*).ts/)[1];
      app.directive(realKey, directives[key].default);
    });
  },
};
